package com.tx.java.chapter9.exercise9_8;

/**
 *
 */
public class A {

    private interface B {
        void f();
    }

    public class BImpl1 implements B{
        @Override
        public void f() {
            System.out.println("public ");
        }
    }

    private class BImpl2 implements  B{
        @Override
        public void f() {
            System.out.println("private");
        }
    }

    B getB(){
        return new BImpl2();
    }

    B getB1(){
        return new BImpl1();
    }

    void callB(){
        getB().f();
    }
}